﻿using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.EntityFrameworkCore;
using WalkingTec.Mvvm.Core;
using WalkingTec.Mvvm.Core.Extensions;
using WalkingTec.Mvvm.Mvc;
using Digitalmes.Model;
using Digitalmes.ViewModel.DashboardManagement;

using Digitalmes.Model.IntegrationManagement;


namespace Digitalmes.DashboardManagement.Controllers
{
    [ApiController]
    [ActionDescription("_Group._Default")]
    [Route("/api/DashboardManagement/_Default")]
    [AuthorizeJwtWithCookie]
    public partial class _DefaultController : BaseApiController
    {
            
        [HttpPost("GetChartDatag1031755138399692")]    
        public IActionResult GetChartDatag1031755138399692(Digitalmes.ViewModel.DashboardManagement.IntgrSyncRemoteSearcher5 Searcher)
        {
             if(Searcher == null)
            {
                Searcher =new Digitalmes.ViewModel.DashboardManagement.IntgrSyncRemoteSearcher5();
            }
           var data = Wtm.DC.Set<IntgrSyncRemote>()
                    .AsNoTracking()
                    .Select(x=> new { _Category = 1 })
                    .GroupBy(x => new {x._Category}, x => x).OrderBy(x =>x.Key._Category)
                    .Select(x => new ChartData{})
                    .ToList();
            var rv = data.ToChartData();
            return Ok(rv);
        }


        [HttpPost("GetChartDatag1051755138399692")]    
        public IActionResult GetChartDatag1051755138399692(Digitalmes.ViewModel.DashboardManagement.IntgrSyncRemoteSearcher6 Searcher)
        {
             if(Searcher == null)
            {
                Searcher =new Digitalmes.ViewModel.DashboardManagement.IntgrSyncRemoteSearcher6();
            }
           var data = Wtm.DC.Set<IntgrSyncRemote>()
                    .AsNoTracking()
                    .Select(x=> new { _Category = 1 })
                    .GroupBy(x => new {x._Category}, x => x).OrderBy(x =>x.Key._Category)
                    .Select(x => new ChartData{})
                    .ToList();
            var rv = data.ToChartData();
            return Ok(rv);
        }


        [HttpPost("GetChartDatag1131755138400871")]    
        public IActionResult GetChartDatag1131755138400871(Digitalmes.ViewModel.DashboardManagement.IntgrSyncRemoteSearcher7 Searcher)
        {
             if(Searcher == null)
            {
                Searcher =new Digitalmes.ViewModel.DashboardManagement.IntgrSyncRemoteSearcher7();
            }
           var data = Wtm.DC.Set<IntgrSyncRemote>()
                    .AsNoTracking()
                    .Select(x=> new { _Category = 1 })
                    .GroupBy(x => new {x._Category}, x => x).OrderBy(x =>x.Key._Category)
                    .Select(x => new ChartData{})
                    .ToList();
            var rv = data.ToChartData();
            return Ok(rv);
        }


        [HttpPost("GetChartDatag1151755138400871")]    
        public IActionResult GetChartDatag1151755138400871(Digitalmes.ViewModel.DashboardManagement.IntgrSyncRemoteSearcher8 Searcher)
        {
             if(Searcher == null)
            {
                Searcher =new Digitalmes.ViewModel.DashboardManagement.IntgrSyncRemoteSearcher8();
            }
           var data = Wtm.DC.Set<IntgrSyncRemote>()
                    .AsNoTracking()
                    .Select(x=> new { _Category = 1 })
                    .GroupBy(x => new {x._Category}, x => x).OrderBy(x =>x.Key._Category)
                    .Select(x => new ChartData{})
                    .ToList();
            var rv = data.ToChartData();
            return Ok(rv);
        }


    }
}



